package cn.tedu.review;

/**
 * @author: Dsi
 * @date: 2021/11/11 9:12
 * @description:该类用于回顾抽象
 */
public class TestAbstract {
    public static void main(String[] args) {
        CGBTeacher c=new CGBTeacher();
    }

}
//创建老师要授课、备课的规定
abstract class Teacher{
    public abstract void ready();
    public abstract void teacher();
    public void eat(){
        System.out.println("人是铁饭是钢");
    }
    public Teacher(){
        System.out.println("父类构造");
    }
}
class  CGBTeacher extends Teacher{
    @Override
    public void ready() {
        System.out.println("正在备课CGB");
    }
    @Override
    public void teacher() {
        System.out.println("正在授课CGB");
    }
    public CGBTeacher(){
        System.out.println("子类构造");
    }
}
abstract class ACTteacher extends  Teacher{
    @Override
    public void ready() {
        System.out.println("正在备课ACT");
    }
}
